#! /usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2020-04-04 18:49
# @Author : youngchaolin


# 例子1
def func1():
    print('i am func1')
    print(3)

def func2():
    print('i am func2')
    print(4)

func1()
print(1)
func2()
print(2)

# 例子2
print('-----练习2-----')
def func1():
    print('i am func1')
    print(3)

def func2():
    print('i am func2')
    func1()
    print(4)

print(1)
func2()
print(2)


# 例子3 函数里面定义函数，在java中好像没有
print('-----练习3----')
def func2():
    print(2)

    def func3():
        print(6)

    print(4)

    func3()

    print(8)

print(3)
func2()
print(5)